<div class="fui-page order-list-page" ng-if="pagedata.op == 'main'">
     <div class="fui-header">
        <div class="fui-header-left">
            <a class="back" ng-click="goback()"></a>
        </div>
        <div class="title">我的订单</div>
        <div class="fui-header-right">
            <a class="icon icon-delete ">回收站</a>
        </div>
    </div>
	<div ng-show="pagedata.status == 4" class="fui-tab fui-tab-danger">
        <a href="javascript:" ng-click="tool.get_list('jy_weishopscale/orderlist/getlist/',true)" class="external">其他订单</a>
        <a class='external active'  data-status=''>退/换货</a>
    </div>

    <div ng-show="pagedata.status != 4" class="fui-tab fui-tab-danger">
		 <a ng-class="{'external active':pagedata.status == 100}" ng-click="pagedata.status = 100;tool.get_list('jy_weishopscale/orderlist/getlist/status=100',true)">全部</a>
        <a ng-class="{'external active':pagedata.status == 0}" ng-click="pagedata.status = 0;tool.get_list('jy_weishopscale/orderlist/getlist/status=0',true)">已下单</a>
        <a ng-class="{'external active':pagedata.status == 1}" ng-click="pagedata.status = 1;tool.get_list('jy_weishopscale/orderlist/getlist/status=1',true)">已接单</a>
        <a ng-class="{'external active':pagedata.status == 2}" ng-click="pagedata.status = 2;tool.get_list('jy_weishopscale/orderlist/getlist/status=2',true)">待收货</a>
        <a ng-class="{'external active':pagedata.status == 3}" ng-click="pagedata.status = 3;tool.get_list('jy_weishopscale/orderlist/getlist/status=3',true)">已完成</a>
 
    </div>
	<div class='fui-content navbar order-list' style="margin-top:0.2rem">
	<div class="fui-list-group order-item" ng-repeat="item in pagedata.list">
                <a class="fui-list external" style="padding: 0.42rem 0.5rem" data-nocache="true" ng-click="access_json('jy_weishopscale/orderdetail//id='+item.id)">
                    <div class="fui-list-inner">
                        <div ng-if="item.status==0 || item.status==4 || item.sendtype ==1" class="subtitle"> 订单号: {{item.ordersn}}</div>
						<div ng-if="item.status!=0 && item.status!=4 && item.sendtype ==2" class="subtitle"> 单票号: {{item.selfnumber}}</div>
                    </div>
                    <div class="row-remark text-cancel" style="width: 4rem; font-size: 0.65rem;text-align: right;">{{item.statustitle}}</div>
                    <div class="angle"></div>
                </a> 
					<div>
						<div class="fui-cell-group" style="margin-top:0">
							<div class="fui-cell" ng-click="access_json('jy_weishopscale/goodslist//id='+item.store.id)">
								<div class="fui-cell-info bold">
									<i class="icon jinyunicon icon-dianpu"></i> {{item.store.title || '平台自营'}}
								</div>
								<div class="fui-cell-remark noremark" style="font-size:0.50rem" ><i class="icon jinyunicon icon-icon-test"></i></div>
							</div>
							<div ng-repeat="(k,g) in item.goods" ng-if="k<5" class="fui-cell" ng-click="access_json('jy_weishopscale/orderdetail//id='+item.id)">
										<div class="fui-cell-text">
											{{g.title}}<span ng-if="g.selespename">({{g.selespename}})</span>
										</div>
										<div class="fui-cell-remark noremark">
											<span>￥ {{g.price}} <span class="subtitle" style="margin-left:0.2rem">x{{g.total}} /{{g.unit ||'件'}}<span ng-if="g.weight!='0.00'"> ({{g.weight}}kg)</span></span></span>
										</div>
							</div>
						</div>
					</div>
                <div class="fui-list-group-title lineblock">
					<span style="color:#999;font-size:0.55rem"><i class="icon jinyunicon icon-shijian" style="color:#f60;font-size:0.50rem"></i> {{item.createtime}}</span>
                    <span class="status noremark">共 <span>{{item.total}}</span> 个商品 {{item.ispay==1?'实付':'约付'}}: <span class="text-danger">￥{{item.price}}</span></span>
                </div>
            <div class="fui-list-group-title lineblock opblock">
				<span class="status noremark">
					<div ng-show="item.status == 0" class="btn btn-sm btn-default-o order-delete" href="javascript:;" ng-click="post({'id':item.id},'cancel')">取消订单</div>
					<div ng-show="item.status == 2 && item.ispay==0" class="btn btn-sm btn-danger-o order-finish" ng-click="pay_submit({},'//pay/id='+item.id,'order.list/','jy_weishopscale/orderlist/')">支付订单</div>
					<div ng-show="item.status == 2" class="btn btn-sm btn-danger-o order-finish" ng-click="access_json('jy_weishop/order.comment/commentorder/id='+item.id)">{{item.pingjia==1?'修改评价':'去评价'}}</div>
					<div ng-show="item.sendtype==1 && item.status == 2" class="btn btn-sm btn-danger-o order-finish" href="javascript:;" ng-click="post({'id':item.id},'receive')">确认收货</div>
					<div ng-show="item.sendtype==2 && item.status==2" class="btn btn-sm btn-danger-o order-finish" href="javascript:;" ng-click="access_json('jy_weishopscale/orderdetail//id='+item.id)">前往使用</div>
					<div ng-show="item.can_refund" class="btn btn-sm btn-danger-o order-finish" href="javascript:;" ng-click="access_json('jy_weishop/order.refund/apply/orderid='+item.id)">申请退款</div>
					
					<div ng-show="item.status==5" class="btn btn-sm btn-danger-o order-finish" href="javascript:;" ng-click="access_json('jy_weishop/order.refund/detail/orderid='+item.id)">查看退款进度</div>
				</span>
            </div>
        </div>
	</div>
	<div class="content-empty" ng-show="pagedata.list.length == 0 ">
		  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">您暂时没有订单！</p>
	</div>
</div>
<!-- 关注公众号 -->
<div id="attention" ng-if="pagedata.showqrcode==1">
    <div class="attention-alert">
        <div class="attention-img"><img ng-src="{{tomedia(pagedata.shopset.store_logo) || '../core/resource/images/nopic.jpg'}}" alt=""></div>
        <div class="attention-title">亲爱的上帝，为了您能正常的接收物流信息，请您先关注我们的公众号</div>
        <div class="attention-content">
            <div class="col-jy-2" style="text-align: center;"><img ng-src="{{tomedia(pagedata.shopset.followqrcode) || '../core/resource/images/nopic.jpg'}}" alt=""style="width: 5.35rem"></div>
            <div class="col-jy-2" style="text-align: center;"><img src="../addons/jy_weishop/images/zhiwen.png" style="width: 3.3rem;margin:auto"></div>
            <p >长按指纹识别图中二维码</p>
        </div>
        <i class="icon icon-cuowu" ng-click="pagedata.showqrcode=0" style="font-size:1.5rem;color:#fff;position: absolute;top:105%;left:46%"></i>
    </div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<script>
scope.tool.get_list('jy_weishopscale/orderlist/getlist/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_weishopscale/orderlist/getlist/status='+scope.pagedata.status);
}
	</script>